import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'deviceinfo_method_channel.dart';

abstract class DeviceinfoPlatform extends PlatformInterface {
  /// Constructs a DeviceinfoPlatform.
  DeviceinfoPlatform() : super(token: _token);

  static final Object _token = Object();

  static DeviceinfoPlatform _instance = MethodChannelDeviceinfo();

  /// The default instance of [DeviceinfoPlatform] to use.
  ///
  /// Defaults to [MethodChannelDeviceinfo].
  static DeviceinfoPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [DeviceinfoPlatform] when
  /// they register themselves.
  static set instance(DeviceinfoPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  void initDeviceInfo() {
    throw UnimplementedError('getDeviceInfo() has not been implemented.');
  }

  Future<Map?> getDeviceInfo() {
    throw UnimplementedError('getDeviceInfo() has not been implemented.');
  }

  Future<Map?> appRank() {
    throw UnimplementedError('appRank() has not been implemented.');
  }
}
